home *** CD-ROM | disk | FTP | other *** search
/ Windows 6-Pak - Disc 5 / Windows 6-Pak (InfoMagic) (Disc 5) (1999).ISO / JAVA-Programming-Tools / jtk101c.exe / DISK2 / licclass.ht_ / licclass.ht
Encoding:
Text File  |  1999-02-04  |  8.3 KB  |  238 lines

  1. <html>
  2.   <head>
  3.     <title>Class License - Evans Java Toolkit</title>
  4.     <meta name="description" content="Evans Programming Java Toolkit - License Class">
  5.     <meta name="keywords" content="license, epjava.lic, java, toolkit">
  6.     <meta name="DESIGN" content="Evans Programming, Hoffman Estates, IL">
  7.   </head>
  8.  
  9.   <body bgcolor="#FFFFFF" link="#FF0000" vlink="#800000" alink="#FF00FF">
  10.  
  11. <!--INCLUDESTART="JTCLSHDR.TXT"-->
  12.       <center>
  13.         <font face="Arial" size="5" color="0000FF">
  14.           <strong>Evans Programming Java Toolkit</strong><br>
  15.         </font>
  16.       </center>
  17.       
  18.       <center>
  19.         <font size="-2" face="Arial" color="FF0000">
  20.           <strong>
  21.             <a href="../jtkit.htm", target="_top">Java Toolkit Page</a> |
  22.             <a href="../softwr.htm", target="_top">Software</a> |
  23.             <a href="../index.html", target="_top">Home</a><br>
  24.           </strong>
  25.         </font>
  26.       </center>
  27. <!--INCLUDESTOP="JTCLSHDR.TXT"-->
  28. <!--INCLUDESTART="JTPGIDX.TXT"-->
  29.       <center>
  30.         <font size="-2" face="Arial" color="FF0000">
  31.           <strong>
  32.             <a href="#DESCRIPTION">Description</a> |
  33.             <a href="#EXAMPLES">Examples</a> |
  34.             <a href="#CONSTRUCTORS">Constructors</a> |
  35.             <a href="#METHODS">Methods</a>
  36.           </strong>
  37.         </font>
  38.       </center>
  39. <!--INCLUDESTOP="JTPGIDX.TXT"-->
  40. <!--INCLUDESTART="JTPGNAV.TXT"-->
  41.  
  42.     
  43.     <a href="eplicexe.htm">Previous</a> 
  44.     <a href="classidx.htm">Next</a> 
  45.     <a href="classidx.htm">Index</a><br>
  46.                                  
  47. <!--INCLUDESTOP="JTPGNAV.TXT"-->
  48.  
  49.     <hr>
  50.     <h1>Class License</h1>
  51.  
  52.     <pre>
  53.     public class evans.toolkit.<strong>License</strong>
  54.     {
  55.         // Constructors
  56.         public <strong>License</strong>()
  57.         
  58.         // Methods
  59.         public boolean <strong>registerLic</strong>(URL url)
  60.     }</pre>
  61.  
  62.     <hr>
  63.     <a name="DESCRIPTION"><img src="descript.gif" width=220 height=60 alt="Description"></a>
  64.  
  65.     <p>
  66.       The <strong>License</strong> Class must be incorporated into your program or the Java 
  67.       Toolkit features will not function (the only exception to this is during the shareware 
  68.       versions' trial period). Using the License class is very simple as demonstrated in 
  69.       the <a href="#EXAMPLES">example</a> below.
  70.     </p>
  71.  
  72.     <p>
  73.       <strong>Note:</strong> During a trial period you can implement the <strong>License()</strong>
  74.       class without actually having an <a href="license.htm">epjava.lic</a> file as long as the license <a href="#METHODS">location</a> is valid.
  75.       It is recommended that you implement the <strong>License()</strong> class even
  76.       during the trial period.
  77.     </p>
  78.       
  79.     <p>
  80.       The advantage to using the <strong>License()</strong> class from the start is that when changing from a trial to a registered version
  81.       of the Toolkit, all you have to do is to place a valid epjava.lic file in the location specified
  82.       in your code.
  83.     </p>
  84.  
  85.     <p>
  86.       <strong>IMPORTANT!</strong> The <strong>License.class</strong> file must always be present 
  87.       with your other Evans Java Toolkit classes or the Toolkit classes will not function! 
  88.       This is true whether you are using a trial, registered or commercial version of the toolkit!
  89.     </p>
  90.  
  91.     <hr>
  92.     <a name="EXAMPLES"><img src="example.gif" width=220 height=60 alt="Example"></a>
  93.  
  94.     <h3>Hard Coded License Directory</h3>
  95.     <pre>
  96.     // License location is "http://www.myserver.com/eplicense"
  97.     import java.applet.*;
  98.     import java.net.*;
  99.     import evans.toolkit.*;
  100.  
  101.     public class MyNewClass
  102.     {
  103.         // Create url pointing to license location
  104.         private URL urlLicLocation = new 
  105.           URL("http://www.myserver.com/eplicense");
  106.   
  107.         public void init()
  108.         {
  109.             // Create license object
  110.             License lic = new License();
  111.     
  112.             // Register license location - returns true if valid epjava.lic at
  113.             // urlLicLocation - also returns true if within a trial period
  114.             if (lic.registerLic(urlLicLocation) == true)
  115.             {
  116.                 // Now you can use any of the Evans Programming Toolkit classes.
  117.             }
  118.         }
  119.     }
  120.     </pre>
  121.  
  122.     <a name="GETDOCBASE">
  123.       <h3>Soft Coded License Directory - Preferred Method</h3>
  124.     </a>
  125.     <pre>
  126.     // One license is in an "eplicense" directory, located below the 
  127.     // HTML directory on the development hard drive. One license is
  128.     // in an "eplicense" directory, located below the HTML directory
  129.     // on the web server.
  130.     import java.applet.*;
  131.     import java.net.*;
  132.     import evans.toolkit.*;
  133.  
  134.     public class MyNewClass
  135.     {
  136.         // Create url pointing to license location
  137.         private URL urlLicLocation = new URL(getDocumentBase(), "eplicense");
  138.   
  139.         public void init()
  140.         {
  141.             // Create license object
  142.             License lic = new License();
  143.     
  144.             // Register license location - returns true if valid epjava.lic at
  145.             // urlLicLocation - also returns true if within a trial period
  146.             if (lic.registerLic(urlLicLocation) == true)
  147.             {
  148.                 // Now you can use any of the Evans Programming Toolkit classes.
  149.             }
  150.         }
  151.     }</pre>
  152.  
  153.     <hr>
  154.  
  155.     <a name="CONSTRUCTORS"><img src="constrct.gif" width=220 height=60 alt="Constructors"></a>
  156.  
  157.     <dl>
  158.       <dt><h3>License</h3>
  159.       <dl>
  160.         <dt><code>public <strong>License</strong>();</code>
  161.       </dl>
  162.       <dd><p>Creates a <strong>License</strong> object.</p>
  163.     </dl>
  164.  
  165.     <hr>
  166.     <a name="METHODS"><img src="methods.gif" width=220 height=60 alt="Methods"></a>
  167.  
  168.     <dl>
  169.       <dt><h3>registerLic</h3>
  170.       <dd><code>String <strong>registerLic</strong>(URL url);</code>
  171.       <dd><p>Specifies the location of the epjava.lic license file. <strong>Do not
  172.           include the license name (epjava.lic) in your url</strong>, only the license location!</p>
  173.  
  174.           <p>Returns true if within the allowable trial period or if the <a href="license.htm">epjava.lic</a>
  175.           file was validated.</p>
  176.  
  177.           <p><strong>IMPORTANT!</strong> This method must be called before any references are made to the Evans Java Toolkit!
  178.           Once this method returns true, it does not need called again as long as the applet
  179.           is running.</p>
  180.       <dl>
  181.         <dt><h4>Parameters:</h4>
  182.         <dd><strong>url</strong> - URL - The location of the epjava.lic file.
  183.       </dl>
  184.       <p></p>
  185.  
  186.       <dl>
  187.         <dt><h4>Notes:</h4>
  188.         <dd><p>Clever use of the <a href="#GETDOCBASE">getDocumentBase()</a> or getCodeBase() methods, instead of hard-coding the license
  189.         location, will allow your applet to easily run on your development system and web server without requiring
  190.         any changes.</p>
  191.       </dl>
  192.     </dl>
  193.  
  194.     <hr>
  195.  
  196. <!--INCLUDESTART="JTPGNAV.TXT"-->
  197.  
  198.     
  199.     <a href="eplicexe.htm">Previous</a> 
  200.     <a href="classidx.htm">Next</a> 
  201.     <a href="classidx.htm">Index</a><br>
  202.                                  
  203. <!--INCLUDESTOP="JTPGNAV.TXT"-->
  204. <!--INCLUDESTART="JTPGIDX.TXT"-->
  205.       <center>
  206.         <font size="-2" face="Arial" color="FF0000">
  207.           <strong>
  208.             <a href="#DESCRIPTION">Description</a> |
  209.             <a href="#EXAMPLES">Examples</a> |
  210.             <a href="#CONSTRUCTORS">Constructors</a> |
  211.             <a href="#METHODS">Methods</a>
  212.           </strong>
  213.         </font>
  214.       </center>
  215. <!--INCLUDESTOP="JTPGIDX.TXT"-->
  216. <!--INCLUDESTART="JTCLSFTR.TXT"-->
  217.     <center>
  218.       <font size="-2" face="Arial" color="FF0000">
  219.         <strong>
  220.           <a href="../jtkit.htm", target="_top">Java Toolkit Page</a> |
  221.           <a href="../softwr.htm", target="_top">Software</a> |
  222.           <a href="../index.html", target="_top">Home</a><br>
  223.         </strong>
  224.       </font>
  225.     </center>
  226.  
  227.     <p></p>
  228.     <font size="-1">Evans Programming Java Toolkit HTML Document<br>
  229.       Generated March 15, 1998<br>
  230.       Revised Februrary 5, 1999<br>
  231.       Copyright 1998-1999 Evans Programming<br>
  232.       Send comments or corrections to <a href="mailto:davidLevans@megsinet.net">davidLevans@megsinet.net</a>
  233.     </font>
  234. <!--INCLUDESTOP="JTCLSFTR.TXT"-->
  235.  
  236.   </body>
  237. </html>
  238.